package models.re.simulatedData;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import models.aaa.Node;
import models.re.IItem;
import models.re.ISimilarity;

@Entity
public class Similarity extends Node implements ISimilarity {
	
	private Double value = 0.0;
	
	@ManyToOne(fetch=FetchType.LAZY)
	private Item source = null;
	
	@ManyToOne(fetch=FetchType.LAZY)
	private Item target = null;
	
	Similarity() {
		
	}
	
	Similarity(IItem source, IItem target, Double value) {
		this.source=(Item)source;
        this.target=(Item)target;  
        this.value=value;
	}

	/* (non-Javadoc)
	 * @see models.re.simulatedData.ISimilarity#getValue()
	 */
	@Override
	public Double getValue() {
		return value;
	}

	/* (non-Javadoc)
	 * @see models.re.simulatedData.ISimilarity#getSource()
	 */
	@Override
	public IItem getSource() {
		return source;
	}

	/* (non-Javadoc)
	 * @see models.re.simulatedData.ISimilarity#getTarget()
	 */
	@Override
	public IItem getTarget() {
		return target;
	}

}
